package com.example;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller     // 声明控制器
@RequestMapping("/home")    // 主路径
public class HelloController {

    @RequestMapping("/hello")   // 从路径，对应：/home/hello
    public String hello(){
        System.out.println("业务一执行");
        return "hello";
    }

    @RequestMapping("/goods")   // 从路径，对应：/home/goods
    public String login(){
        System.out.println("业务二执行");
        return "goods";
    }
}